﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZF.BLL;
using GCELibrary.Current;


namespace ZF.WS.Admin.Member
{
    public partial class addInte : ZF.BLL.Page.MMPage
    {   
        [PageArgument(Key = "mid",CanNull=false)]
        public int MemberId { get; set; }
        public Model.US_Member Member { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                Member = dc.US_Member.FirstOrDefault(p => p.MemberId == MemberId);
                if (Member == null)
                    throw WarnFactory.CreateWarn(WarnCode.ReocrdNoFind);
            }

        }
        protected void Ok(object sender, EventArgs e)
        {
            SiteInfo.IntegralLog(MemberId, "手动赠送积分", this.tbInte.Text.Convert<int>());
            WarnFactory.CreateWarn(new PageWarnParameter()
            {
                JscriptMode = true,
                Message = "操作成功",
                Link = WarnLink.Close,
            }).Alert();
        }
    }
}
